cmake_minimum_required(VERSION 3.2)

# include path
INCLUDE_DIRECTORIES(/usr/local/include)
INCLUDE_DIRECTORIES(include)
INCLUDE_DIRECTORIES(3rdparty/rapidjson/include)
INCLUDE_DIRECTORIES(3rdparty/filesystem/include)

# link path
LINK_DIRECTORIES(/usr/local/lib)

# test cc file
FILE(GLOB_RECURSE UNIT_TEST_CC RELATIVE ${CMAKE_SOURCE_DIR}/test/cc "*test*.cc")

include(require_gtest)
include(require_gmock)

# target
ADD_EXECUTABLE(cc_unit_test ${UNIT_TEST_CC})

TARGET_LINK_LIBRARIES(cc_unit_test tbir)
TARGET_LINK_LIBRARIES(cc_unit_test pthread)
TARGET_LINK_LIBRARIES(cc_unit_test ${GTEST_LIB})
TARGET_LINK_LIBRARIES(cc_unit_test ${GMOCK_LIB})
TARGET_LINK_LIBRARIES(cc_unit_test ${GTEST_MAIN_LIB})
